
class Animal{
    public String name;
    public int age;

    public  void set(){
        System.out.println("父类");
    }

   /* public Animal shout() {
        System.out.println("协变关系");
    }*/
}

class Cat extends Animal{
    public String hair;

    @Override
    public  void set() {
        System.out.println("子类");
    }

   /* public Cat shout() {

    }*/
}

public class TestDemo {
    public static void main(String[] args) {
        Animal animal = new Cat();
        animal.set();
    }
}
